package com.rd.teacher.jichao.day04;

import java.util.Date;

public class Test {

    public static void main(String[] args) {
        // alt + enter 自动导包
        Date date = new Date();
        System.out.println(date);

//        System.out.println(date.getYear() + 1900);
//        System.out.println(date.getMonth());
//        System.out.println(date.getHours());


        // 等待了一会儿
        try {
            Thread.sleep(30000);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }

        Date date1 = new Date();
        System.out.println(date1);
        if (date1.before(date)) {
            System.out.println("date1 在 date 之前");
        } else {
            System.out.println("date 在 date1 之前");
        }

    }
}
